<?php
Configure::write('debug', 0);
echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n";
?>
<rss version="2.0">
	<channel>
		<title>Lolerei: Recent Articles Feed</title>
		<link>http://mabinogi.logue.be/</link>
		<description>The 15 Most Recent Articles at The Lolerei.</description>
		<language>ja-jp</language>
		<pubDate><?php echo $time->toRss($time->gmt()); ?></pubDate>
		<docs>http://mabinogi.logue.be/articles/rss.xml</docs>
		<generator>Lolerei</generator>
		<managingEditor>lolerei@logue.be</managingEditor>
		<webMaster>lolerei@logue.be</webMaster>
<?php foreach ($articles as $article){ ?>
		<item>
			<title><?php echo h($article['Article']['title']); ?></title>
			<author><?php echo h($article['User']['username']); ?></author>
			<link>http://mabinogi.logue.be/articles/view/<?php echo $article['Article']['id']; ?></link>
			<description><![CDATA[<?php echo mb_strimwidth(strip_tags($article['Article']['body']),0,256,'...','UTF-8'); ?>]]></description>
			<pubDate><?php echo $time->toRss($time->gmt($article['Article']['created'])); ?></pubDate>
			<guid>http://mabinogi.logue.be/articles/view/<?php echo $article['Article']['id']; ?></guid>
			<enclosure url="http://mabinogi.logue.be/mmls/export/<?php echo $article['Article']['id']; ?>/midi" type="video/quicktime" />
			<category><?php echo h($article['Category']['name']);?></category>
		</item>
<?php } ?>
	</channel>
</rss>
